<?php
/**
 * http服务配置
 */
/** 控制器目录 */
defined('CONTROLLERPATH') or define('CONTROLLERPATH', APPPATH . DS . 'Controllers');
/** 模型目录 */
defined('MODELPATH') or define('MODELPATH', APPPATH . DS . 'Models');
/** 模板目录 */
defined('VIEWPATH') or define('VIEWPATH', APPPATH . DS . 'views');

return [
    "http" => [
        'appPath'    => ROOTPATH . DS . 'app',
        'serverHost' => '0.0.0.0:9501',
        'route'      => [
            '/v1/api/?(get|post|put|patch|delete)?' => ['any', '@App\Controllers\ApiController'],
            '/index'       => ['get', 'App\Controllers\DefaultController@indexAction'],
        ],
        'server'     => [
            'daemonize'  => 0,
            'worker_num' => 2,
        ],
    ],
];
